package com.one.common.location_service;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

import com.one.common.config.CMemoryData;
import com.one.common.config.CPersisData;
import com.one.common.utils.Logger;

/**
 * Author: zhulunjun
 * Email: zhulunjun@qq.com
 * CreateDate: 2019/5/31 16:30
 * Description：
 **/
public class AlarmReceiver extends BroadcastReceiver {
    @Override
    public void onReceive(Context context, Intent intent) {
        if (intent.getAction().equals("LOCATION_CLOCK")) {
            Logger.e("ggb", "--->>>   onReceive  LOCATION_CLOCK");
            Intent locationIntent = new Intent(context, LocationService.class);
            if(CPersisData.getIsLogin() && CMemoryData.isCar()) {
                context.startService(locationIntent);
            }
        }
    }
}
